package com.icedevcloud.upms.controller.admin.permission.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 路由配置信息ResDto
 * </p>
 *
 * @author dengbing
 * @since 2023-08-21
 */
@Schema(name = "路由配置信息ResDto")
@Data
public class RouterResDto {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "父ID")
    private Long pid;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "路由地址名称")
    private String name;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "组件重定向路径")
    private String redirect;

    @Schema(description = "RouteMeta")
    private RouteMeta meta;

    @Schema(description = "子权限")
    private transient List<RouterResDto> children;

    @Data
    public static class RouteMeta {

        @Schema(description = "路由标题")
        private String title;

        @Schema(description = "图标")
        private String icon;

        @Schema(description = "是否隐藏菜单")
        private Boolean hideMenu;

        @Schema(description = "是否隐藏面包屑")
        private Boolean hideBreadcrumb;

        @Schema(description = "框架内链接")
        private String frameSrc;

        @Schema(description = "是否不缓存")
        private Boolean ignoreKeepAlive;

    }

}
